package com.nwpu.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName tbl_user
 */
@TableName(value ="tbl_user")
@Data
public class User implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @Size(max= 64,message="用户ID长度不能超过64")
    private String userId;

    /**
     * 
     */
    @Size(max= 20,message="邮箱地址长度不能超过20")
    @Email(message = "邮箱地址格式不正确")
    private String email;

    /**
     * 
     */
    private String password;

    /**
     * 
     */
    private String nickname;

    /**
     * 
     */
    private String gender;

    /**
     * 
     */
    private String avatarUrl;

    /**
     * 
     */
    private BigDecimal balance;

    /**
     * 
     */
    private String paykey;

    /**
     * 
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 
     */
    private String salt = "";

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}